{include file='pub/base' /}
  <link rel="stylesheet" href="/static/formbuilder/vendor.css" />
  <link rel="stylesheet" href="/static/formbuilder/formbuilder.css" />
  <style>
  * {
    box-sizing: border-box;
  }

  body {
    background-color: #d6d3d3;
    font-family: sans-serif;
  }

  .fb-main {
    background-color: #fff;
    border-radius: 5px;
    min-height: auto;
  }

  input[type=text] {
    height: 26px;
    margin-bottom: 3px;
  }

  select {
    margin-bottom: 5px;
    font-size: 40px;
  }
  </style>
<div class="page-container">
   <div class='fb-main'></div>
</div>
<input name='ziduan' id='ziduan' value='{$info.ziduan ?? ''}' type='hidden'>

<input name='id' id='id' value='{$fid}' type='hidden'>

  <script src="/static/formbuilder/vendor.js"></script>
  <script src="/static/formbuilder/formbuilder.js"></script>
 <script>
    $(function(){
      fb = new Formbuilder({
        selector: '.fb-main',
        bootstrapData: {$ziduan|raw}
      });
      fb.on('save', function(payload){
        $('#ziduan').val(payload);
      })
	  $("#up").click(function(){
		 var ziduan=$("#ziduan").val();
		 var id=$("#id").val();
		$.ajax({  
			 url:'{:url("desc")}',
			 data:{ziduan:ziduan,id:id},  
			 type:'post',  
			 cache:true,  
			dataType:'json',			 
			 success:function(data) {  
				if(data.code==0){
					parent.layer.msg('设置成功');
					setTimeout(function(){
					parent.location.reload();
					},1000)
				}
			  },  
			  error : function() {  
			  }  
		 }); 
		
		})
    });
	
  </script>
